/**
 * 
 */
package com.dsteiner.xelavos.client.model;

import java.beans.PropertyChangeListener;
import java.util.List;

import com.dsteiner.widgets.client.PropertyChangeCollection;
import com.dsteiner.widgets.client.domain.ModelObject;
import com.dsteiner.widgets.client.domain.Sort;

public class SearchModel {
	private PropertyChangeCollection propertyChangeSupport = new PropertyChangeCollection(
			this);

	public void addPropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		propertyChangeSupport.registerPropertyChangeListener(propertyName,
				listener);
	}

	private int count;

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		int oldCount = this.count;
		this.count = count;
		propertyChangeSupport.firePropertyChange("count", oldCount, count);
	}

	private List<ModelObject> results;

	public List<ModelObject> getResults() {
		return results;
	}

	public void setResults(List<ModelObject> results) {
		List<ModelObject> oldResults = this.results;
		this.results = results;
		propertyChangeSupport.firePropertyChange("results", oldResults, results);
	}
}